import { ObjCreate } from "../common/ObjCreate";
import { GTextArea } from "../../../../com/mui/controls/GTextArea";
import { GTextFormat } from "../../../common/GTextFormat";
import { FontUtil } from "../../../common/font/FontUtil";
import { ScrollPolicy } from "../../../../fl/controls/ScrollPolicy";
import { FilterConst } from "../../../component/gconst/FilterConst";
import { HTMLUtil } from "../../../../com/gengine/utils/HTMLUtil";
import { Language } from "../../../../extend/language/Language";
import { GlobalStyle } from "../../../common/global/GlobalStyle";
import { ScaleBitmap } from "../../../../com/mui/display/ScaleBitmap";
//class SkillStatePanel
    
    export  class SkillStatePanel /* flash.display.Sprite */
    {
        constructor()
        {
            
            this.initUI();
            return;
        }

        protected initUI(): void
        {
            this._bg = ObjCreate.createBg(0, 0, this.width, this.height, this);
            this._infoTxt = new GTextArea();
            this._infoTxt.styleName = "GTextArea";
            this._infoTxt.wordWrap = true;
            this._infoTxt.textField.defaultTextFormat = new GTextFormat(FontUtil.defaultFont.fontName, 12, 11661311, null, null, null, null, null, flash.text.TextFormatAlign.LEFT, null, null, null, 4);
            this._infoTxt.textField.selectable = false;
            this._infoTxt.editable = false;
            this._infoTxt.verticalScrollPolicy = ScrollPolicy.AUTO;
            this._infoTxt.horizontalScrollPolicy = ScrollPolicy.OFF;
            this._infoTxt.height = this.height - 10;
            this._infoTxt.width = this.width - 10;
            this._infoTxt.x = 5;
            this._infoTxt.y = 5;
            this._infoTxt.textField.filters = [FilterConst.nameGlowFilter];
            this.addChild(this._infoTxt);
            this._infoTxt.htmlText = HTMLUtil.addColor(Language.getString(20698), GlobalStyle.color1);
            return;
        }

        public /* override */ get width(): number
        {
            return 300;
        }

        public /* override */ get height(): number
        {
            return 430;
        }

        /* internal */ /* var */_bg: ScaleBitmap;

        /* internal */ /* var */_infoTxt: GTextArea;
    }
